package com.java.exer1;

/**
 * @author shkstart
 * @create 2021-01-12 19:32
 */
public class Test {
    public static void main(String[] args) {
//        Shape[] shapes={new Triangle(7,6,5),new Rectangle(7,9),new Circle(6)};
//        for (int i = 0; i < shapes.length; i++) {
//            System.out.println(shapes[i]);
//        }
//        System.out.println("---------------------------------------");
//
//        Shape[] shapes1={new Rectangle(4,89),new Rectangle(4,5),new Rectangle(4,6)};
//
//        SortMethod.sort(shapes1);
//        SortMethod.sort(shapes);
//        for (int i = 0; i < shapes1.length; i++) {
//            System.out.println(shapes[i]);
//            System.out.println("--------------------");
//            System.out.println(shapes1[i]);
//
//        }
        Shape[] shapes = {new Rectangle(6, 7), new Circle(2), new Triangle(3, 4, 5)};

        SortMethod.sort(shapes);

        for (int i = 0; i < shapes.length; i++) {
            System.out.println(shapes[i]);

        }
//        for (Shape e:shapes
//             ) {
//            System.out.println(e);
//
//        }

    }
}
